Drop a few unneeded ifs
authorMatthias Clasen <mclasen@redhat.com>
Mon, 8 Dec 2014 20:38:41 +0000 (15:38 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 8 Dec 2014 22:30:35 +0000 (17:30 -0500)
It does not hurt to pass NULL to g_list_free().

gtk/gtkappchooserwidget.c

index ebe1d00065052d7c2463faa2c3235044a5ebf4cd..01f9a4b9089c3fc6985ba12a44aa451c56e740c9 100644 (file)
@@ -798,17 +798,10 @@ gtk_app_chooser_widget_real_add_items (GtkAppChooserWidget *self)
   if (default_app != NULL)
     g_object_unref (default_app);
 
-  if (all_applications != NULL)
-    g_list_free_full (all_applications, g_object_unref);
-
-  if (recommended_apps != NULL)
-    g_list_free_full (recommended_apps, g_object_unref);
-
-  if (fallback_apps != NULL)
-    g_list_free_full (fallback_apps, g_object_unref);
-
-  if (exclude_apps != NULL)
-    g_list_free (exclude_apps);
+  g_list_free_full (all_applications, g_object_unref);
+  g_list_free_full (recommended_apps, g_object_unref);
+  g_list_free_full (fallback_apps, g_object_unref);
+  g_list_free (exclude_apps);
 }
 
 static void